<?php
include('./lib/PHPMailer/class.phpmailer.php');
global $mail, $lg;
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mailHost = Info::getByName('mail host');
$mail->Host       = strip_tags(trim($mailHost['content_vn'])); // SMTP server
//$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->Port       = 25;                    // set the SMTP port for the GMAIL server
$mailUserName = Info::getByName('mail username');

$mail->Username   = strip_tags(trim($mailUserName['content_vn'])); // SMTP account username
$mailPass = Info::getByName('mail password');
$mail->Password   = strip_tags(trim($mailPass['content_vn']));        // SMTP account password

$mailName = Info::getByName('mail username');
$mailUserName = Info::getByName('mail sender name');

$mail->SetFrom(strip_tags(trim($mailName['content_vn'])), !empty($mailUserName['content_vn'])?$mailUserName['content_vn']:'Webmaster');
$mail->CharSet = "UTF-8"; 

//$mail->AddBCC('timkhachsan.vn@gmail.com', 'Tìm Khách Sạn');
?>